﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

using DreamCube.Foundation.Basic.Utility;

namespace Test
{
    /// <summary>
    /// 测试杀掉进程
    /// </summary>
    class TestKillProcess
    {
        public static void KillWord()
        {
            Process[] ps = Process.GetProcesses();
            for (Int32 i = 0; i < ps.Length; i++)
            {
                if (ps[i].ProcessName.ToUpper() == "WINWORD")
                {
                    ps[i].Kill();
                }
            }
        }

        public static void KillIE()
        {
            MyProcess.KillProcessByName("iexplore");
            Console.WriteLine(MyProcess.IsExistProcess("iexplore"));
        }
    }
}
